CREATE TABLE VPI.EXTRACT_SERVICE
(
	SERVICE_ID		VARCHAR2(32)		NOT NULL,
	SERVICE_NAME	VARCHAR2(64)		NOT NULL,
	SERVICE_OWNER	VARCHAR2(32),
	DESCRIPTION_	VARCHAR2(1024),
	LATEST_VERSION	NUMBER(4) DEFAULT 0	NOT NULL,

	CONSTRAINT PK_EXTRACT_SERVICE PRIMARY KEY (SERVICE_ID),
	CONSTRAINT CK_EXTRACT_SERVICE_ID CHECK (SERVICE_ID = UPPER(SERVICE_ID)),
	CONSTRAINT CK_EXTRACT_SERVICE_VER CHECK (LATEST_VERSION >= 0),
	CONSTRAINT UK_EXTRACT_SERVICE_NAME UNIQUE (SERVICE_NAME)
)
STORAGE (INITIAL 16K NEXT 16K);

COMMENT ON TABLE VPI.EXTRACT_SERVICE
	IS 'The registry of extract services (applications)';

COMMENT ON COLUMN VPI.EXTRACT_SERVICE.SERVICE_ID
	IS 'The unique identifier for a extract service (application), consider a naming convention within the enterprise.';
COMMENT ON COLUMN VPI.EXTRACT_SERVICE.SERVICE_NAME
	IS 'The extract service (application) name.';
COMMENT ON COLUMN VPI.EXTRACT_SERVICE.SERVICE_OWNER
	IS 'The owner of the extract service (application).';
COMMENT ON COLUMN VPI.EXTRACT_SERVICE.LATEST_VERSION
	IS 'The last deployed version number.';
